﻿using Dapper;
using Mall.Service.Dto.Query;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Mall.DomainModel.Dto.Query
{
    public class ShipperManageUserQueryInput : QueryObject<ShipperManageUser>
    {
        public long Id { get; set; }
        public override List<Expression<Func<ShipperManageUser, bool>>> QueryExpression => throw new NotImplementedException();
        public override Dictionary<string, DynamicParameters> QuerySql
        {
            get
            {
                DynamicParameters param = new DynamicParameters();
                StringBuilder sql = new StringBuilder();
                sql.Append(" WHERE IsDeleted=0");
                if (Id!=0)
                {
                    sql.Append(" AND Id=@Id");
                    param.Add("Id", Id);
                }
                Dictionary<string, DynamicParameters> querySql = new Dictionary<string, DynamicParameters>();
                querySql.Add(sql.ToString(), param);
                return querySql;
            }
        }
    }
}
